﻿@model List<DotNet.JCore.Entity.SystemReg>
@{
    Layout = null;
    int total = Model.Count;
}
<div class="djcCenNum">共搜索到<span id="sys_totalcount">@total</span>条符合条件的信息</div>
@if (total > 0)
{
    var RegTypeText = "";
    foreach (var item in Model)
    {
        if (item.RegType == 0) { RegTypeText = "系统登记"; }
        if (item.RegType == 1) { RegTypeText = "自动登记"; }
        if (item.RegType == 2) { RegTypeText = "人工登记"; }
        <table class="djcCTDri" style="margin-top:20px;">
            <tr>
                <td>车牌号</td>
                <td>@item.CarNumber</td>
                <td>客运站</td>
                <td>@item.Station</td>
            </tr>
            <tr>
                <td>实载乘客</td>
                <td>@item.PassengerNumber 人</td>
                @*<td>核载人数</td>
                        <td>@item.SeatCount 人</td>
                    </tr>
                    <tr>
                        <td>售票数</td>
                        <td>@item.PassengerNumber 张</td>*@
                <td>线路</td>
                <td>@item.Line</td>
            </tr>
            <tr>
                <td>司机姓名</td>
                <td>@item.DriverName</td>
                <td>司机电话</td>
                <td>@item.DriverPhone</td>
            </tr>
            <tr>
                <td>运输企业</td>
                <td>@item.Corp</td>
                <td>稽查点</td>
                <td>@item.PointName</td>
            </tr>
            <tr>
                @if (!item.CheckStatus)
                    {

                    <td>稽查状态</td>
                    <td><span style="color:lightgreen; font-weight:800;">正常</span></td>
                    <td></td>
                    <td><span style="color:lightgreen; font-weight:800;"></span></td>

                }
                else
                {
                    <td>稽查状态</td>
                    <td><span style="color:red;  font-weight:800;">违规</span></td>
                    <td>违规类型</td>
                    <td><span style="color:red; font-weight:800;">@item.OffenceName</span></td>
                }
            </tr>
            <tr>
                <td>操作人姓名</td>
                <td>@item.CreateName</td>
                <td>登记时间</td>
                <td>@DateTimeHelper.FormatDateHasSecond(item.CreateTime)</td>
            </tr>

            <tr>
                <td>运行时间</td>
                <td>
                    @if (item.RunSecond > 120)
                    {<text>大于2小时</text>}
                    else
                    {<text>@item.RunSecond 分钟</text>}
                </td>
                <td>出站时间</td>
                @if (item.RegType == 2)
                {
                    <td>@DateTimeHelper.FormatDateHasSecond(item.CreateTime)</td>
                }
                else
                {
                    <td>@DateTimeHelper.FormatDateHasSecond(item.ExitTime)</td>
                }
            </tr>
            <tr>
                <td>登记方式</td>
                <td>@RegTypeText</td>
                <td>备注</td>
                <td>@item.Note</td>
            </tr>
        </table>
    }
}